//
//  GLKTableView.m
//  KTools
//
//  Created by 121 on 2017/9/28.
//  Copyright © 2017年 杭州吉利控股信息中心. All rights reserved.
//

#import "GLForm.h"


@interface GLForm()
@property(nonatomic,strong)NSMutableArray* sectioins;

@end

@implementation GLForm

#pragma mark- lifecycle
- (instancetype)init
{
    self = [super init];
    if (self) {
    }
    return self;
}

+(instancetype)formWithTag:(NSString*)tag{
    GLForm* form = [[GLForm alloc]initWithTag:tag];
    return form;
}
-(instancetype)initWithTag:(NSString*)tag{
    
    self = [super init];
    if (self) {
        _tag = tag;
    }
    return self;
}

-(void)addFormSection:(GLFormSection*)section{
    if (!section) {
        return;
    }
    [self.sectioins addObject:section];
}

- (void)removeFormSectionIndex:(NSInteger)index {
    if (index < self.sectioins.count) {
        [self.sectioins removeObjectAtIndex:index];
    }
}

#pragma mark-
-(NSMutableArray*)sectioins{
    if (!_sectioins) {
        _sectioins = [NSMutableArray arrayWithCapacity:0];
    }
    return _sectioins;
}


@end
